package com.example.rk.mapper;

import com.example.rk.entity.Job;
import com.example.rk.entity.Resume;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Component;

import java.util.List;

@Mapper
@Component
public interface ResumeMapper {

    List<Resume> findBySearch(String title, int sid);
    @Update("update resume set zt=1  where id=#{id}")
    void doEdit1(int id);
    @Update("update resume set zt=2 where id=#{id}")
    void doEdit2(int id);
    @Delete("delete from resume where id=#{id}")
    void deleteById(int id);
    @Select("select * from resume where title=#{title}")
    Resume findadd(String title);
    @Insert("insert into resume (title,sid,zt,content) values(#{title},#{sid},#{zt},#{content})")
    void create(Resume resume);
    @Select("SELECT * FROM resume where id=#{id}")
    Resume findById(int id);
    @Update("update resume set title=#{title},content=#{content} where id=#{id}")
    void doEdit(Resume resume);

    List<Resume> findBySearch1(String title, int sid, int zt);
}
